package xyz.talentboy.model;

import java.util.Date;

import xyz.talentboy.common.constant.MessageType;
import xyz.talentboy.common.util.MessageUtil;
import xyz.talentboy.model.message.TextMessageBean;


public class MessageResponse {
	
	/**
	 * 创建文本消息
	 *
	 * @param fromUserName
	 * @param toUserName
	 * @param content
	 * @return xml
	 */
	public static String getMessage(String fromUserName, String toUserName, String content) {
		TextMessageBean textMessage = new TextMessageBean();
		textMessage.setToUserName(fromUserName);
		textMessage.setFromUserName(toUserName);
		textMessage.setCreateTime(new Date().getTime()+"");
		textMessage.setMsgType(MessageType.text.toString());
		textMessage.setContent(content);
		return MessageUtil.messageToXml(textMessage);
	}
	
}
